﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ToDoApp.Data;
using System.Data.Entity.Migrations;
using ToDoApp.DataModels;

namespace ToDoApp.Data
{
    public class Seeder
    {
        public static void Seed(ApplicationDbContext context)
        {
            context.todoList.AddOrUpdate(
                x => x.Task,
                new ToDo { Task="Clean room", IsFinished=false, TimeStamp=DateTime.Now.ToFileTime().ToString() },
                new ToDo { Task = "Clean kitchen", IsFinished = false, TimeStamp = DateTime.Now.ToFileTime().ToString() },
                new ToDo { Task = "Get eggs", IsFinished = false, TimeStamp = DateTime.Now.ToFileTime().ToString() },
                new ToDo { Task = "Dance like no one is watching", IsFinished = false, TimeStamp = DateTime.Now.ToFileTime().ToString() }
                
                );
            context.SaveChanges();
        }
    }
}
